﻿
Partial Class Interfaz_Otros_Controls_Calendario
    Inherits System.Web.UI.UserControl

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not Page.IsPostBack Then
            Me.txtCalendario.Text = Me.Calendar1.TodaysDate
            Me.Calendar1.Visible = False
        End If
    End Sub

    Protected Sub ImageButton1_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles ImageButton1.Click
        Me.Calendar1.Visible = True
    End Sub

    Protected Sub Calendar1_SelectionChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Calendar1.SelectionChanged
        Me.txtCalendario.Text = Me.Calendar1.SelectedDate
        Me.Calendar1.Visible = False
    End Sub

    Public Function obtieneValorFecha() As String
        Try
            Dim valorFecha As String = Me.txtCalendario.Text
            Return valorFecha
        Catch ex As Exception
            Throw ex
        End Try
    End Function

   
End Class
